{% extends "admin/base_site.html" %}

{% block content %}

{% block content_header %}
<h1>Model view</h1>
This is a default template used by the generic application <i>view_application</i>.
<p>
You may define a suitable template (the default is <i>view_application.html</i>) with the <i>template</i> parameter
in the urls.py file as follows:
<pre>
    (r'^my/appli/view_appli/$',
      'goflow.workflow.applications.view_application',
      {'template':'mytemplate.html'}),
</pre>

This template can access the following variables:
<ul>
<li>object: object (linked to the process instance, instance.wfobject())
<li>submit_name: submit buttons name
<li>ok_values: list of submit values (button labels) for OK
<li>cancel_value: submit value for cancel button
</ul>
<p>
This application should be used on two cases:
<ul>
<li>simple view: an information panel is diplayed for user notification
<li>complex edition: from this panel, you may edit a complex object; indeed the workflow object
may be a complex composition of children objects. In order to complete the activity
an OK button has to be clicked.
</ul>
{% endblock %}


{% block content_form %}
<form method="post">
	 {% csrf_token %}
	{% block buttons_form %}
	{% for value in ok_values %}
	<input type="submit" name="{{ submit_name }}" value="{{ value }}">
	{% endfor %}
	<input type="submit" name="{{ submit_name }}" value="{{ cancel_value }}">
	{% endblock %}

</form>
{% endblock %}

{% endblock %}
